import ajax from '@/api/apiConfig.js'

/* 获取联网单位关联人联系方式 */
export const getOPC = (data) => {
  return ajax.get('communicat/getOPC', data)
}

/* 发送短信 */
export const sendMessage = (data) => {
  return ajax.post('communicat/sendMessage', data)
}

/* 发送邮件 */
export const sendEmail = (data) => {
  return ajax.post('communicat/sendEmail', data)
}

/* 获取常用电话列表 */
export const getCUsedP = (data) => {
  return ajax.get('communicat/getCUsedP', data)
}

/* 插入常用电话模板 */
export const insertPTemplate = (data) => {
  return ajax.post('communicat/insertPTemplate', data)
}

/* 更新模板电话 */
export const updateCUsedP = (data) => {
  return ajax.post('communicat/updateCUsedP', data)
}

/* 删除常用电话 */
export const delCUsedP = (data) => {
  return ajax.post('communicat/delCUsedP', data)
}

/* 获取短信记录 */
export const getMRList = (data) => {
  return ajax.get('communicat/getMRList', data)
}

/* 获取邮件记录 */
export const getERList = (data) => {
  return ajax.get('communicat/getERList', data)
}

/* 获取语音通知记录 */
export const getVOList = (data) => {
  return ajax.get('communicat/getVOList', data)
}

/* 新增、更新用户电话本 */
export const addPhoneBookUser = (data) => {
  return ajax.post('communicat/addPhoneBookUser', data)
}

/* 提报、指派隐患 */
export const saveHiddenDanger = (data) => {
  return ajax.post('hiddenDanger/saveHiddenDanger', data)
}

/* 行车记录 */
export const getParkingPassRecordList = (data) => {
  return ajax.getJSON(ajax.getUrl('/car/upstream/getParkingPassRecordList',data) )
}
